package cn.cs.client;

import cn.cs.config.CsConfiguration;
import cn.cs.fallback.FaultTypeFallBack;
import cn.cs.pojo.*;
import org.springframework.cloud.netflix.feign.FeignClient;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;

import java.util.List;
import java.util.Map;

@FeignClient(name = "cs-order-provider", configuration = CsConfiguration.class, fallback = FaultTypeFallBack.class)
public interface RestFaultTypeClient {


    @RequestMapping(value = "/getConcelcause", method = RequestMethod.POST)
    public List<AppOrderConcelcause> getConcelcause()throws Exception;

    @RequestMapping(value = "/getFaultCategory", method = RequestMethod.POST)
    public List<ServiceType> getFaultCategory()throws Exception;

    @RequestMapping(value = "/getTypeTree", method = RequestMethod.POST)
    public List<FaultType> getTypeTree();

    @RequestMapping(value = "/getFaultType", method = RequestMethod.POST)
    public List<FaultType> getFaultType();

    @RequestMapping(value = "/getFaultTypeTree", method = RequestMethod.POST)
    public List<FaultType> getFaultTypeTree();

    @RequestMapping(value = "/getFaultTypeByPid", method = RequestMethod.POST)
    public List<Map<String,Object>> getFaultTypeByPid(@RequestParam("id") String id);

    @RequestMapping(value = "/getTwoFaultCategory", method = RequestMethod.POST)
    public List<FaultType> getTwoFaultCategory(@RequestParam("level") String level)throws Exception;

    @RequestMapping(value = "/getFaultTypeById", method = RequestMethod.POST)
    public List<Map<String,Object>> getFaultTypeById(@RequestParam("parentId") String parentId)throws Exception;

    @RequestMapping(value = "/getFaultTypeByParentId", method = RequestMethod.POST)
    public List<Map<String,Object>> getFaultTypeByParentId(@RequestParam("parentId") String parentId)throws Exception;

    @RequestMapping(value = "/getFaultTypeListByMap", method = RequestMethod.POST)
    public List<FaultType> getFaultTypeListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getFaultTypeCountByMap", method = RequestMethod.POST)
    public Integer getFaultTypeCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getServiceTypeListByMap", method = RequestMethod.POST)
    public List<ServiceType> getServiceTypeListByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/getServiceTypeCountByMap", method = RequestMethod.POST)
    public Integer getServiceTypeCountByMap(@RequestBody Map<String, Object> param)throws Exception;

    @RequestMapping(value = "/addFaultType", method = RequestMethod.POST)
    public Integer addFaultType(@RequestBody FaultType faultType)throws Exception;

    @RequestMapping(value = "/modifyFaultType", method = RequestMethod.POST)
    public Integer modifyFaultType(@RequestBody FaultType faultType)throws Exception;

    @RequestMapping(value = "/deleteFaultTypeById", method = RequestMethod.POST)
    public Integer deleteFaultTypeById(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/deleteServiceTypeById", method = RequestMethod.POST)
    public Integer deleteServiceTypeById(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/addServiceType", method = RequestMethod.POST)
    public Integer addServiceType(@RequestBody ServiceType serviceType)throws Exception;

    @RequestMapping(value = "/modifyServiceType", method = RequestMethod.POST)
    public Integer modifyServiceType(@RequestBody ServiceType serviceType)throws Exception;

    @RequestMapping(value = "/getFaultTypeByIdOnlyOne", method = RequestMethod.POST)
    public FaultType getFaultTypeByIdOnlyOne(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getFaultTypeByOnlyId", method = RequestMethod.POST)
    public FaultType getFaultTypeByOnlyId(@RequestParam("id") String id)throws Exception;

    @RequestMapping(value = "/getServiceTypeList", method = RequestMethod.POST)
    public List<ServiceType> getServiceTypeList();

    @RequestMapping(value = "/getFaultTypeEntityByParentId", method = RequestMethod.POST)
    public List<FaultType> getFaultTypeEntityByParentId(Map<String, Object> param);

    @RequestMapping(value = "/getServiceTypeById", method = RequestMethod.POST)
    public ServiceType getServiceTypeById(@RequestParam("id") String id)throws Exception;


}
